__author__ = 'Administrator'
data={}
def men(arge):
    #定义顶部菜单顺序
    head_list = ["index","report","zdh","rsync","check","users","hosts","om"]
    #定义顶部菜单导航
    head_men = {
        "index":["仪表盘","/logs",True,""],
        "report":["报表统计","/report/nginx_access",True,""],
        "zdh":["自动化","/zdh",True,""],
        "rsync":["同步分发","/rsync",True,""],
        "check":["巡检监控","/check",True,""],
        "users":["用户管理","/users",True,""],
        "hosts":["主机管理","/hosts",True,""],
        "om": ["资产管理", "/om", True, ""]
    }
    #定义左边的菜单导航
    left_men = {
        "index":[["仪表盘","/logs",True,""],["登陆日志","/logs",True,""]],
        "zdh":[["自动化","/zdh",True,""],["服务部署","/zdh",True,""]],
        "report": [["报表统计","/report/nginx_access",True,""],["访问统计图","/report/nginx_access",True,""],["流量图","/report/line",False,""]],
        "rsync":[["同步分发","/rsync",True,""],["文件同步","/rsync/file",False,""],["目录同步","/rsync/dir",True,""]],
        "check":[["巡检监控","/check",True,""],["数据采集","/check/host",True,""],["主机信息","/check/info",False,""]],
        "users":[["用户管理","/users",True,""],["添加用户","/users/add",True,""],["用户组管理","/users_group",True,""]],
        "hosts":[["主机管理","/hosts",True,""],["添加主机","/hosts/add",True,""],["主机组管理","/hosts_group",True,""]],
        "om": [["主机管理", "/om", True, ""]],
    }
    ##============================================================================================================

    head_men[arge][3]="active"
    left_men[arge][0][3]="active"
    total=left_men
    left_men=left_men[arge]
    ##============================================================================================================
    data["head_list"] = head_list
    data['head_men'] = head_men
    data["left_men"] = left_men
    data['total']=total
    #print(head_men)
    return data

if __name__ == '__main__':
    data=men('report')
    print(data["head_men"])
    hh=data["head_men"]
    hh.sort()
    for key in hh:
        print(key,data["head_men"].get(key))
    pass